@model ProjectCodeS.Models.Client

@* This partial view defines form fields that will appear when creating and editing entities *@

<div class="editor-label">
    @Html.LabelFor(model => model.FirstName)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.FirstName)
    @Html.ValidationMessageFor(model => model.FirstName)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.LastName)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.LastName)
    @Html.ValidationMessageFor(model => model.LastName)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.Phone)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Phone)
    @Html.ValidationMessageFor(model => model.Phone)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.Created)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Created)
    @Html.ValidationMessageFor(model => model.Created)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.LastEdited)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.LastEdited)
    @Html.ValidationMessageFor(model => model.LastEdited)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.LastAccessed)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.LastAccessed)
    @Html.ValidationMessageFor(model => model.LastAccessed)
</div>

<div class="editor-label">
    Store
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.StoreId, ((IEnumerable<ProjectCodeS.Models.Store>)ViewBag.PossibleStores).Select(option => new SelectListItem {
        Text = (option == null ? "None" : option.Name), 
        Value = option.Id.ToString(),
        Selected = (Model != null) && (option.Id == Model.StoreId)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.StoreId)
</div>
